﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace IGolovkine.ShoutCastRipper.Service.Configuration
{
    public class FileRepositoryElement : ConfigurationElement
    {
        private const string PathTag = "path";
        private const string CancelIfExistsTag = "cancelIfExists";
        private const string LookUpFoldersTag = "lookUpFolders";
        private const string FileCommandsTag = "fileCommands";

        [ConfigurationProperty(PathTag, IsRequired = true)]
        public string Path
        {
            get { return (string)this[PathTag]; }
            set { this[PathTag] = value; }
        }

        [ConfigurationProperty(CancelIfExistsTag, IsRequired = true)]
        public bool CancelIfExists
        {
            get { return Convert.ToBoolean(this[CancelIfExistsTag]); }
        }

        [ConfigurationProperty(LookUpFoldersTag, IsRequired = false)]
        public LookUpFolderElementCollection LookUpFolders
        {
            get { return (LookUpFolderElementCollection)this[LookUpFoldersTag]; }
        }

        [ConfigurationProperty(FileCommandsTag, IsRequired = false)]
        public FileCommandElementCollection FileCommands
        {
            get { return (FileCommandElementCollection)this[FileCommandsTag]; }
        }
    }
}
